#ifndef UTILS_H
#define UTILS_H

#include <QJsonObject>

enum {
    SVT_UNKONWN = 0,
    SVT_HOUR = 1,
    SVT_DATE = 2,
    SVT_MOUNTH = 3,
    SVT_WEEK = 4,
    SVT_CLOSE = 5,
    SVT_PRIORITY = 6
};

QString GetString(QJsonObject &data, QString key);

int GetInt(QJsonObject &data, QString key);

bool GetBool(QJsonObject &data, QString key);

QString GetValidityCountString(int DateUnit, int DateCount);

QString GetSaveTypeString(int DaveType);

QString GetOperationTypeString(int OperationType);

#endif // UTILS_H
